package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.SysMapBar;
import com.ruoyi.system.service.ISysMapBarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 数据录入Controller
 * 
 * @author YuHaoxiang
 * @date 2022-10-15
 */
//Controller
@RestController
@RequestMapping("/dashboard/barchart")
public class SysMapBarController extends BaseController {

    @Autowired
    private ISysMapBarService sysMapBarService;

    @ResponseBody
    @PreAuthorize("@ss.hasPermi('dashboard:barchart:listBar')")     //权限访问设置
    @GetMapping("/listBar" )
    public TableDataInfo listBar(SysMapBar sysMapBar){
        List<SysMapBar> listBar = sysMapBarService.selectSysMapBarList(sysMapBar);
        return getDataTable(listBar);
    }
}

